home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol146 / xlftab2.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-12-16  |  2.6 KB  |  93 lines

  1. /* xlftab2.c - xlisp function table - part 2 */
  2. /*    Copyright (c) 1985, by David Michael Betz
  3.     All Rights Reserved
  4.     Permission is granted for unrestricted non-commercial use    */
  5.  
  6. #include "xlisp.h"
  7.  
  8. /* external functions */
  9. extern NODE
  10.     *xfix(),*xfloat(),
  11.     *xadd(),*xsub(),*xmul(),*xdiv(),*xrem(),*xmin(),*xmax(),*xabs(),
  12.     *xadd1(),*xsub1(),*xbitand(),*xbitior(),*xbitxor(),*xbitnot(),
  13.     *xsin(),*xcos(),*xtan(),*xexpt(),*xexp(),*xsqrt(),
  14.     *xlss(),*xleq(),*xequ(),*xneq(),*xgeq(),*xgtr(),
  15.     *xstrcat(),*xsubstr(),*xstring(),*xchar(),
  16.     *xread(),*xprint(),*xprin1(),*xprinc(),*xterpri(),
  17.     *xflatsize(),*xflatc(),
  18.     *xopeni(),*xopeno(),*xclose(),*xrdchar(),*xpkchar(),*xwrchar(),*xreadline(),
  19.     *xload(),*xgc(),*xexpand(),*xalloc(),*xmem(),*xtype(),*xexit();
  20.  
  21. /* the function table */
  22. struct fdef ftab2[] = {
  23.  
  24.     /* arithmetic functions */
  25. {    "TRUNCATE",    SUBR,    xfix        },
  26. {    "FLOAT",    SUBR,    xfloat        },
  27. {    "+",        SUBR,    xadd        },
  28. {    "-",        SUBR,    xsub        },
  29. {    "*",        SUBR,    xmul        },
  30. {    "/",        SUBR,    xdiv        },
  31. {    "1+",        SUBR,    xadd1        },
  32. {    "1-",        SUBR,    xsub1        },
  33. {    "REM",        SUBR,    xrem        },
  34. {    "MIN",        SUBR,    xmin        },
  35. {    "MAX",        SUBR,    xmax        },
  36. {    "ABS",        SUBR,    xabs        },
  37. {    "SIN",        SUBR,    xsin        },
  38. {    "COS",        SUBR,    xcos        },
  39. {    "TAN",        SUBR,    xtan        },
  40. {    "EXPT",        SUBR,    xexpt        },
  41. {    "EXP",        SUBR,    xexp        },
  42. {    "SQRT",        SUBR,    xsqrt        },
  43.  
  44.     /* bitwise logical functions */
  45. {    "BIT-AND",    SUBR,    xbitand        },
  46. {    "BIT-IOR",    SUBR,    xbitior        },
  47. {    "BIT-XOR",    SUBR,    xbitxor        },
  48. {    "BIT-NOT",    SUBR,    xbitnot        },
  49.  
  50.     /* numeric comparison functions */
  51. {    "<",        SUBR,    xlss        },
  52. {    "<=",        SUBR,    xleq        },
  53. {    "=",        SUBR,    xequ        },
  54. {    "/=",        SUBR,    xneq        },
  55. {    ">=",        SUBR,    xgeq        },
  56. {    ">",        SUBR,    xgtr        },
  57.  
  58.     /* string functions */
  59. {    "STRCAT",    SUBR,    xstrcat        },
  60. {    "SUBSTR",    SUBR,    xsubstr        },
  61. {    "STRING",    SUBR,    xstring        },
  62. {    "CHAR",        SUBR,    xchar        },
  63.  
  64.     /* I/O functions */
  65. {    "READ",        SUBR,    xread        },
  66. {    "PRINT",    SUBR,    xprint        },
  67. {    "PRIN1",    SUBR,    xprin1        },
  68. {    "PRINC",    SUBR,    xprinc        },
  69. {    "TERPRI",    SUBR,    xterpri        },
  70. {    "FLATSIZE",    SUBR,    xflatsize    },
  71. {    "FLATC",    SUBR,    xflatc        },
  72.  
  73.     /* file I/O functions */
  74. {    "OPENI",    SUBR,    xopeni        },
  75. {    "OPENO",    SUBR,    xopeno        },
  76. {    "CLOSE",    SUBR,    xclose        },
  77. {    "READ-CHAR",    SUBR,    xrdchar        },
  78. {    "PEEK-CHAR",    SUBR,    xpkchar        },
  79. {    "WRITE-CHAR",    SUBR,    xwrchar        },
  80. {    "READ-LINE",    SUBR,    xreadline    },
  81.  
  82.     /* system functions */
  83. {    "LOAD",        SUBR,    xload        },
  84. {    "GC",        SUBR,    xgc        },
  85. {    "EXPAND",    SUBR,    xexpand        },
  86. {    "ALLOC",    SUBR,    xalloc        },
  87. {    "MEM",        SUBR,    xmem        },
  88. {    "TYPE-OF",    SUBR,    xtype        },
  89. {    "EXIT",        SUBR,    xexit        },
  90.  
  91. {    0                    }
  92. };
  93.